package dealer.models
{
	import dealer.Global;
	
	import flash.display.MovieClip;
	import flash.text.TextField;

	public class HandlerLogin extends MovieClip
	{
		private static var LOGIN:MovieClip;
		public static var btnSubmit:MovieClip;
		public static var txtMessage:TextField;
		public static var txtRommId:TextField;
		public static var lbRoom:MovieClip;
		public static var txtUser:TextField;
		public static var lbUser:MovieClip;
		public static var txtPass:TextField;
		public static var lbPass:MovieClip;
		public static var lbLang:MovieClip;
		/* check language */
		public static var chkHK:MovieClip;
		public static var chkEN:MovieClip;
		/* label array */
		public static var lbArr:Array;
		
		public function HandlerLogin()
		{
			super();
		}
		/* comment function */
		public static function init($controlApp:MovieClip):void
		{
			LOGIN=$controlApp;
			btnSubmit=LOGIN.btnLogin_mc;
			btnSubmit.buttonMode=true;
			btnSubmit.mouseChildren=false;
			txtRommId=LOGIN.roomid_txt;			
			txtRommId.text=Global.ROOM_NO.toString();
			lbRoom=LOGIN.lbroom_mc;
			txtUser=LOGIN.user_txt;
			lbUser=LOGIN.lbuser_mc;
			txtPass=LOGIN.pass_txt;
			lbPass=LOGIN.lbpass_mc;
			txtMessage=LOGIN.mess_txt;
			txtUser.text=txtPass.text=txtMessage.text="";
			lbLang=LOGIN.lblang_mc;
			var tmpArr:Array=[txtUser,txtPass,btnSubmit];
			for(var i:int=0;i<tmpArr.length;i++){
				tmpArr[i].tabIndex=i;
			}
			/* check language */
			chkHK=LOGIN.langhk_mc;
			chkEN=LOGIN.langen_mc;
			chkEN.gotoAndStop("check");
			/* label array */
			lbArr=[lbRoom,lbUser,lbPass,lbLang,btnSubmit];
		}
	}
	/* End Class */
}